package chp02.homework;

import java.util.Scanner;

public class Home1 {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("STB的成绩:");
        int stb = input.nextInt();
        System.out.print("Java的成绩:");
        int java = input.nextInt();
        System.out.print("SQL的成绩:");
        int sql = input.nextInt();
        System.out.println("----------------------------------");
        System.out.println("STB\tJava\tSQL");
        System.out.println(stb + "\t" + java + "\t" + sql);
        System.out.println("----------------------------------");

        int cha = java - sql;
        System.out.println("Java和SQL成绩相差:" + cha);
        //计算平均分
        int total = java + stb + sql;
        int avg = total / 3;
        System.out.println("3门课的平均分:" + avg);
    }
}
